//
//  MHFeedBackViewController.m
//  MiaoCircle
//
//  Created by 许正荣 on 2018/6/26.
//  Copyright © 2018年 acgera. All rights reserved.
//

#import "MHFeedBackViewController.h"
#import "UITextView+Placeholder.h"
#import "MHFeedBackViewModel.h"
@interface MHFeedBackViewController ()

@property(nonatomic, strong) MHFeedBackViewModel *viewModel;
@end


@implementation MHFeedBackViewController
@dynamic viewModel;
- (void)viewDidLoad {
    [super viewDidLoad];
    self.feedBackTextView.font = MHRegularFont_15;
    self.feedBackTextView.placeholder = @"尽量详细的描述您遇到的问题和现象,也欢迎对我们吐槽您不爽的地方，感谢您对我们提出的宝贵的意见";
    self.edgesForExtendedLayout = UIRectEdgeNone;
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)rightButtonClick
{
    if (self.feedBackTextView.text.length <= 0) {
        [MBProgressHUD mh_showTips:@"请输入"];
        return;
    }
    
    [[self.viewModel.feedbackCommand execute:self.feedBackTextView.text] subscribeNext:^(id x) {
        [MBProgressHUD mh_showTips:@"提交成功"];
    }];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
